
public class TD1_EX1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int u = 1;
		int i = 1;
		System.out.println("U(0) = "+u);
		while(i < 100)
		  {
		  if (u % 2 == 0){
			  u = u/2;
			  i++;

		  } else {
			  u = u * 3 + 1;
		  }
		  System.out.println("U(" + i + ") = " + u );
		  }

	}

}
